using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableWorldBossStrongholdEffectDao:DaoBase<TableWorldBossStrongholdEffect>
    {
        public override void AddPrimaryIndex(TableWorldBossStrongholdEffect model)
        {
            cachePrimary[model.PreBattleInfId.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableWorldBossStrongholdEffect.txt";
        }

        protected override TableWorldBossStrongholdEffect ParseRowData(string[] rowData)
        {
            TableWorldBossStrongholdEffect data = new TableWorldBossStrongholdEffect();

            if (string.IsNullOrEmpty(rowData[0]))
            {
                data.PreBattleInfId = 0;
            }
            else
            {
                data.PreBattleInfId = int.Parse(rowData[0]);
            }

            if (string.IsNullOrEmpty(rowData[1]))
            {
                data.PreBattleInfType = 0;
            }
            else
            {
                data.PreBattleInfType = int.Parse(rowData[1]);
            }
			data.PreBattleInfDetail = rowData [2];

            return data;
        }



    }

}
